var webpack = require('webpack')

module.exports = {
  entry: {
    "vendor": ['react', 'react-dom', 'underscore', 'react-router'],
    "main": './src/index.jsx'
  },

  output: {
    path: 'dist',
    filename: '[name].js'
  },

  module: {
    loaders: [
      {
        test: /\.(jsx|es6)$/,
        exclude: /node_modules/,
        loader: "babel-loader"
      }
    ]
  },

  plugins: [
    new webpack.optimize.CommonsChunkPlugin({
      name: "vendor",
      minChunks: Infinity
    })
  ]
}
